package scuba.DiveBuddy.Class;

import android.content.Context;
import scuba.DiveBuddy.data.AirMixSource;
import scuba.DiveBuddy.data.Database;

/**
 * @author Alex Anderson
 * @version 1.0
 * @since {28/02/14}
 */
public class DatabaseLoadingThread extends Thread {
    private Context appCtx;

    public DatabaseLoadingThread(Context c) {
        this.appCtx = c;
    }

    @Override
    public void run() {
        super.run();

        //Implement a Loader for the Database
        Database db = new Database(appCtx);
        //db.Clense(); //clean all tables without need to update database number
        db.Open();

        //Create some Defaults
        AirMixSource.CreateMix(new AirMix("EANx32", 32, 68, 0));
        //AirMixSource.CreateMix(new AirMix("EANx36", 36, 62, 0));

    }
}
